import React from 'react'
import {Carousel} from 'antd';
import 'antd/dist/antd.css';
import './Carousel.css';
import API from "../../api/api";

// let img1 = require('https://ckeditor.com/docs/ckeditor4/latest/assets/img/ckeditor_quick_start_download.png');


const EIPCarousel = () => {

    let getCarouselArr = API.getLinks("slideshow","side");

    {/*轮播图渲染*/}
    function recurrence(){
        return(
            renderCarouselArr()
        )
    }

    {/*轮播图渲染*/}
    function renderCarouselArr(){
        return(
            getCarouselArr.map(item=>{
                return(
                    <div dangerouslySetInnerHTML={{__html:item.link }}></div>
                )
            })
        )
    }

    return (
        <Carousel autoplay className="width-image-setting">
            {/*轮播图渲染*/}
            {recurrence()}
        </Carousel>
    );
}

export default EIPCarousel
